﻿using System.Net;

namespace UdpServer
{
    public class UDPBody
    {
        public byte[] BodyBytes { get; set; }
        public string IpAddr => Remote.Address.ToString();

        public int Port => Remote.Port;

        public IPEndPoint Remote { get; set; }

        public UDPBody(byte[] bodyBytes)
        {
            BodyBytes = bodyBytes;
        }

        public UDPBody(byte[] bodyBytes, IPEndPoint remote)
        {
            BodyBytes = bodyBytes;
            Remote = remote;
        }


        public UDPBody()
        {
        }
    }
}
